<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('')"/>
    <link th:href="@{/css/sidebar.css}" rel="stylesheet"/>
    <link th:href="@{/css/superMapCss/pretty.css}" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="scene-toolbar" id="scene-toolbar" style="display: block">
    <br>
</div>

<div class="scene-toolbar-all">
    <!--在线地图-->
    <div class="scene-toolbar-onlinelayer" id="scene-toolbar-onlinelayer" style="display: block">
        <div class="toolbar-layer-item">
            <div class="title">在线底图
                <i class="close-panel fa fa-remove"></i>
            </div>
            <div class="toolbar-layer-tree">
                <ul id="onlinelayertree" class="ztree" style="width:300px; overflow:auto;"></ul>
            </div>
        </div>
    </div>
    <!--图层-->
    <div class="scene-toolbar-layer" id="scene-toolbar-layer" style="display: block">
        <div class="toolbar-layer-item">
            <div class="title">图层
                <i class="close-panel fa fa-remove"></i>
            </div>
            <div class="toolbar-layer-tree" id="toolbar-layer-tree">
                <ul id="layertree" class="ztree" style="width:300px; overflow:auto;"></ul>
            </div>
        </div>
    </div>

    <!-- 气泡HTML -->
    <div id="bubble" class="bubble" style="overflow: auto; bottom:0;left:82%;display:none;border: #666 1px solid">
        <div id="tools" style="text-align : right">
            <span style="color: rgb(95, 74, 121);padding: 5px;position: absolute;left: 10px;top: 4px;">对象属性</span>
            <span class="fui-export" id="bubblePosition" style="color: darkgrey; padding:5px" title="停靠"></span>
            <span class="fui-cross" title="关闭" id="close" style="color: darkgrey;padding:5px"></span>
        </div>
        <div style="overflow-y:auto;" id="tableContainer">
            <table id="tab" style="height: 100px;"></table>
        </div>
    </div>

    <!--工具-->
    <div class="scene-toolbar-toolbox" id="scene-toolbar-toolbox" style="display: block">
        <div class="toolbar-layer-item">
            <div class="title">工具
                <i class="close-panel fa fa-remove"></i>
            </div>
            <div class="toolbar-layer-tree">
                <ul id="toolboxtree" class="ztree" style="width:230px; overflow:auto;"></ul>
            </div>
        </div>
    </div>

    <!--3d底图-->
    <div class="earth-layer">
        <div id="cesiumContainer" class="fullSize"></div>
    </div>

</body>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: ztree-css"/>
<th:block th:include="include :: ztree-js"/>
<script th:src="@{/js/sideMenu.js}" type="text/javascript"></script>
<script th:src="@{/js/3Dearth.js}" type="text/javascript"></script>
<script th:src="@{/js/menuTree.js}" type="text/javascript"></script>
<script th:src="@{/js/onlineLayerTree.js}" type="text/javascript"></script>
<script th:src="@{/js/layerAdd.js}" type="text/javascript"></script>
<script th:src="@{/js/layerRemove.js}" type="text/javascript"></script>
<script th:src="@{/js/bubble.js}" type="text/javascript"></script>
<script th:src="@{/js/superMapJs/require.min.js}" th:data-main="@{/js/superMapJs/main}" type="text/javascript"></script>
<script th:src="@{/js/superMapJs/config.js}" type="text/javascript"></script>


<script th:inline="javascript">
    var addFlag = [[${@permission.hasPermi('local:appmenu:add')}]];
    var editFlag = [[${@permission.hasPermi('local:appmenu:edit')}]];
    var removeFlag = [[${@permission.hasPermi('local:appmenu:remove')}]];
    var menuTypeDatas = [[${@dict.getType('sys_menu_type')}]];
    var visibleDatas = [[${@dict.getType('sys_show_hide')}]];
    var prefix = ctx + "local/3Dearth/sidemenu";
    var prefix2 = ctx + "local/3Dearth/layerlist";


    $(function () {
        // 菜单
        $.ajax({
            type: "POST",
            url: prefix + "/list",
            data: {},//发送到服务器的数据
            dataType: "json",
            success: function (data) {
                var length = data.rows.length;
                var rows = data.rows;
                for (var i = 0; i < length; i++) {
                    $("#scene-toolbar").append("<div class='toolbar-item' menucode='" + rows[i].menuId + "' menutype='" + rows[i].menuType + "' onclick='showMenu(this)'><i class='" + rows[i].icon + " item-icon'></i><br>" + rows[i].menuName + "</div>")
                }
            }
        });

    });

</script>


</html>